package svc

import (
	"api/internal/config"
	"github.com/zeromicro/go-zero/zrpc"
	"jdmall_svc/jdmallclient"
)

type ServiceContext struct {
	Config    config.Config
	JdMallRpc jdmallclient.Jdmall
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:    c,
		JdMallRpc: jdmallclient.NewJdmall(zrpc.MustNewClient(c.JdMallRpc)),
	}
}
